import { BankCard, CommonObj } from './global';

export interface OperatorInviteItem extends CommonObj {
  name: string;
  phone: string;
  status: number;
  operatorId: string;
  creatorId: string;
  createUser?: {
    nickname: string;
  };
  refuseReason: string;
}

export interface OperatorInviteSearchParams {
  status?: number;
  phone?: string;
  name?: string;
  startDate?: string;
  endDate?: string;
  range?: string[];
}

export interface OperatorSearchParams {
  name?: string;
  province?: string;
  city?: string;
  startDate?: string;
  endDate?: string;
  range?: string[];
}

export interface OperatorItem extends CommonObj {
  name: string;
  city: string;
  province: string;
  address: string;
  contactTel: string;
  contactEmail: string;
  contactName: string;
  logo: string;
  pics: string[];
  bankName: string;
  bankAccount: string;
  bankNumber: string;
  license: string;
  introduction: string;
  status: number;
}

export interface OperatorRecord {
  id: string;
  startTime: number;
  endTime?: number;
  detail: string;
}

export interface Operator {
  id: string;
  name: string;
  contactPerson: string;
  contactPhone: string;
  area: string;
  province: string;
  city: string;
  address: string;
  license: string;
  logo: string;
  pics: string[];
  intro: string;
  bankCard: BankCard;
  records: OperatorRecord[];
  applyTime: number;
  gmtCreate: number;
  gmtUpdate: number;
}
